package com.vue.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;

/**
 * @author: wrj
 * @since: 2025/2/12 09:24
 * @description:
 */

@Configuration
public class DeepSeekConfig {
//    private static final String API_KEY = System.getenv("DEEPSEEK_API_KEY");
    @Value("${deepSeek.apiKey}")
    private String API_KEY;

    public final String API_URL = "https://api.deepseek.com/v1/chat/completions";

    public HttpHeaders createHeaders() {
        HttpHeaders headers = new HttpHeaders();
        headers.setContentType(MediaType.APPLICATION_JSON);
        headers.set("Authorization", "Bearer " + API_KEY);
        return headers;
    }
}